package org.mics.order.request;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 下单请求
 * @author mics
 * @date 2020年8月13日
 * @version  1.0
 */
@Data
@Schema(description =  "下单请求")
public class PlaceOrderRequest {

    @NotBlank(message = "商品id不能为空")
    @Schema(description = "商品id")
    private String goodsId;
    
    @NotBlank(message = "商品描述不能为空")
    @Schema(description = "商品描述")
    private String goodsDescription;
    
    @NotBlank(message = "金额不能为空")
    @Pattern(regexp="^([1-9]\\d{0,9}|0)(\\.\\d{1,2})?$")
    @Schema(description = "订单金额")
    private String amount;

    @NotBlank(message = "附加数据")
    @Schema(description = "附加数据")
    private String attach;
    
    @Schema(description = "ip",hidden = true)
    private String ip;
    

   
}
